#ifndef MYDATA_H
#define MYDATA_H

#include <QObject>
/**
 * @brief 数据模块
 * @version 1.0
 * @author Albert
 * @date 2021.03.25
 *      [1.0]
 *          1.数据存入
 *          2.数据提取
 */
class MyData : public QObject
{
    Q_OBJECT
protected:
    explicit MyData(QObject *parent = nullptr);

public:
    /**
     * @brief 获取单例对象
     * @return
     */
    static MyData *getObject();
    int co2;//传感协议
    bool smoke;//烟雾
    int pm2_5;
    int illumination;//光照
    bool inf1;//人体红外
    bool inf2;
    bool methane;//甲烷
    int ultraviolet_rays;//紫外线
    bool fire;
    bool antiphoto;//对射
    bool reflection;//反射
    double temperature;
    double humidity;

protected:
    static MyData *obj;

};

#endif // MYDATA_H
